﻿using System;
using System.Collections.Generic;
using System.Text;
using WuyuanSpecialty.Tea;

namespace WuyuanSpecialty
{
    public class WySpecialty
    {
        private readonly Class1 _purseRedCarpTea;
        private readonly Class2 _wuyuanGreenTea;
        private readonly Class3 _longweiInkstone;
        private readonly Prompt _promptsuccess;
        public WySpecialty(Class1 purseRedCarpTea, Class2 wuyuanGreenTea, Class3 longweiInkstone, Prompt promptsuccess)
        {
            this._purseRedCarpTea = purseRedCarpTea;
            this._wuyuanGreenTea = wuyuanGreenTea;
            this._longweiInkstone = longweiInkstone;
            this._promptsuccess = promptsuccess;
        }
        public void Shopping(int Tea)
        {
            if (Tea == 1)
            {
                _purseRedCarpTea.SelectionAndPurchase();
            }
            else if (Tea == 2)
            {
                _purseRedCarpTea.Cancel();
            }
            else if (Tea == 3)
            {
                _wuyuanGreenTea.SelectionAndPurchase();
            }
            else if (Tea == 4)
            {
                _wuyuanGreenTea.Cancel();
            }
            else if (Tea == 5)
            {
                _longweiInkstone.SelectionAndPurchase();
            }
            else if (Tea == 6)
            {
                _longweiInkstone.Cancel();
            }
            else if (Tea == 7)
            {
                _purseRedCarpTea.SelectionAndPurchase();
                _wuyuanGreenTea.SelectionAndPurchase();
                _longweiInkstone.SelectionAndPurchase();
            }
            else if (Tea == 9)
            {
                _promptsuccess.SuccessfulPurchase();
            }
            else
            {
                _purseRedCarpTea.Cancel();
                _wuyuanGreenTea.Cancel();
                _longweiInkstone.Cancel();
            }

        }
        public void TeaList(string a)
        {
            _purseRedCarpTea.PurseRedCarp(a);
            _wuyuanGreenTea.WuyuanGreen(a);
            _longweiInkstone.LongweiInkstonetea(a);
        }
    }
}
